|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectPER.rover.WallFollowAction
WallFollowAction will follow a flat surface for a specified centimeter distance. The action is considered successfull if the wall is followed for the complete distance. The action is not successful if the rover encounters an obstacle or reaches the end of the wall before traversing the entire distance specified.
Constructor Summary | |
WallFollowAction()
Creates a new instance of WallFollowAction which drives forever |
|
WallFollowAction(int dist)
Creates a new instance of WallFollowAction with the saftey on. |
Method Summary | |
boolean |
doAction(Rover r)
Tries to start the action. |
long |
getImageUpdateTime()
Lets you know when the last image was taken by this action. |
java.awt.image.BufferedImage |
getRecentImage()
Returns the most recent image taken by this Action. |
int |
getReturnValue()
The return value of the Action. |
java.lang.String |
getShortSummary()
Provides a shortened version of the summary returned by getSummary. |
java.lang.String |
getSummary()
Provides a textual explanation of the Action, such as "turn 90 degrees" |
int |
getTime()
How long the action will take, in milliseconds. |
int |
getTimeRemaining()
How much time until the action finishes (in milliseconds), if it has already started. |
boolean |
isCompleted()
Whether the action has completed. |
boolean |
isSuccess()
Returns true if the rover traversed the entire specified distance. |
void |
kill()
Emergency stop - end the action immediately, if it's running. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public WallFollowAction()
public WallFollowAction(int dist)
dist
- the distance to travel along the wall in centimetersMethod Detail |
public boolean doAction(Rover r)
Action
doAction
in interface Action
public int getReturnValue()
Action
getReturnValue
in interface Action
RoverState
,
ActionConstants
public java.lang.String getShortSummary()
Action
getShortSummary
in interface Action
public java.lang.String getSummary()
Action
getSummary
in interface Action
public int getTime()
Action
getTime
in interface Action
public int getTimeRemaining()
Action
getTimeRemaining
in interface Action
public boolean isCompleted()
Action
isCompleted
in interface Action
public boolean isSuccess()
isSuccess
in interface Action
public void kill()
Action
kill
in interface Action
public long getImageUpdateTime()
Action
getImageUpdateTime
in interface Action
public java.awt.image.BufferedImage getRecentImage()
Action
getRecentImage
in interface Action
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |